From 643d873f47f4f45d660759e9814254fce680d1f6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 30 Jul 2020 13:23:45 -0400 Subject: [PATCH] eventcontrollerkey: Update im focus when active window changes Use the new GTK_CROSSING_ACTIVE crossing events to update the im context focus when the window becomes active or inactive. IBus requires this, since it has only a single, global focus location. Fixes: #2390 --- gtk/gtkeventcontrollerkey.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c index e813654be8..4d8774b425 100644 --- a/gtk/gtkeventcontrollerkey.c +++ b/gtk/gtkeventcontrollerkey.c @@ -154,7 +154,8 @@ gtk_event_controller_key_handle_crossing (GtkEventController *controller, gboolean start_crossing, end_crossing; gboolean is_focus; - if (crossing->type != GTK_CROSSING_FOCUS) + if (crossing->type != GTK_CROSSING_FOCUS && + crossing->type != GTK_CROSSING_ACTIVE) return; start_crossing = crossing->direction == GTK_CROSSING_OUT && -- 2.30.2